MyGame.s3 = function(game) {
	
	

};


MyGame.s3.prototype = {
    create: function() {
    	
    	
		console.log('s3-工人')
        game.add.image(0,0,'s3_bg');

        game.ganzi = game.add.image(0,0,'s3_ganzi');
        game.zi = game.add.image(458,466,'s3_zi');
        game.zi.alpha = 0;

        game.add.tween(game.ganzi).to({x:'-1300'},2500,Phaser.Easing.Cubic.Out,true,2000).onComplete.add(function(){

            game.add.tween(game.zi).to({alpha:1},2000,Phaser.Easing.Cubic.Out,true,0).onComplete.add(function(){
                GameUI.touch(558,756,function(){
                    game.touch1.kill()
                    game.touch2.kill()
                    
                    loadChart('p3',function(){
                        $('#p3').hide();
                        setTimeout(function(){
                            $('#p3').find('.chat-content').css({
                                opacity : 1
                            })
                        },0)

                        game.state.start('s4')


                    })

                });
            })


            
        })



        







        GameUI.cutscenes()
        

       

    },
    update: function() {
    	
    	
    	
    },
    
    
    
    render : function(){
    	/*game.obstacles.forEach(function(item){
            game.debug.body(item);
        })
    	game.debug.body(game.player);*/
    }
};

